/**
 * 
 */
package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.People;
import es.ats.codington.festival.domain.Visitor;

/**
 * @author 5Cs
 *
 */
public class PeopleMapper implements RowMapper<Visitor> {

	@Override
	public Visitor mapRow(ResultSet resultSet, int numRow) throws SQLException {
		Visitor visitor = new Visitor();
			visitor.setVisitorId(resultSet.getInt("idPeople"));
			visitor.setName(resultSet.getString("Name"));
			visitor.setLastName(resultSet.getString("LastName"));
			visitor.setAge(resultSet.getInt("Age"));
			visitor.setAddress(resultSet.getString("Address"));
			visitor.setPhoneNumber(resultSet.getString("PhoneNumber"));
		return visitor;
	}
}
